using System;

namespace Rhizome.Model
{
	public class IfMoreThenOrEquals<T> : PropertyAndValueCriterionBase<T>
		where T : IComparable
	{
		public IfMoreThenOrEquals(string property, T value) : base(property, value)
		{
		}

		public IfMoreThenOrEquals(string property) : base(property)
		{
		}

		public IfMoreThenOrEquals()
		{
		}

		protected override sealed bool IsTrue(T value)
		{
			return value.CompareTo(Value) >= 0;
		}
	}

	public sealed class IfMoreThenOrEquals : IfMoreThenOrEquals<IComparable>
	{
	}
}